package zsw.factory;

import zsw.pojo.AodiCar;
import zsw.pojo.BaomaCar;
import zsw.pojo.Car;
import zsw.pojo.DazhongCar;

public class SimpleFactoy {
	
	public Car getCar(String name) {
		if("baoma".equals(name)) {
			return new BaomaCar();
		}else if ("aodi".equals(name)) {
			return new AodiCar();
		}else if ("dazhong".equals(name)) {
			return new DazhongCar();
		}
		return null;
		
	}
	
	

}


